{yun:}include file="$wapadminstyle/header.htm"{/yun}
<script src="{yun:}$config.sy_weburl{/yun}/js/ueditor/ueditor.config.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/ueditor/ueditor.all.min.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="js/mobiscroll/mobiscroll_002.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="js/mobiscroll/mobiscroll.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="js/mobiscroll/mobiscroll_003.js?v={yun:}$config.cachecode{/yun}"></script>
<link rel="stylesheet" href="js/mobiscroll/css/animate.min.css?v={yun:}$config.cachecode{/yun}" type="text/css"/>
<link rel="stylesheet" href="js/mobiscroll/css/mobiscroll.css?v={yun:}$config.cachecode{/yun}" type="text/css"/> 
<script type="text/javascript">
var ue = UE.getEditor('description',{
	toolbars: false,elementPathEnabled:false,wordCount:false,autoHeightEnabled:false 
});
$(function () {
	var currYear = (new Date()).getFullYear();
	var opt = {
		preset: 'date', //日期
		theme: 'android-ics light', //皮肤样式
		display: 'modal', //显示方式 
		mode: 'scroller', //日期选择模式
		dateFormat: 'yy-mm-dd', // 日期格式
		setText: '确定', //确认按钮名称
		cancelText: '取消',//取消按钮名籍我
		dateOrder: 'yyyymmdd', //面板中日期排列式
		dayText: '日', monthText: '月', yearText: '年',
		startYear: currYear - 100, //开始年份
		endYear: currYear //结束年份
	};
	$(".sdate").mobiscroll('setDate', $(".sdate").val(), true).date(opt); 
 });
</script>
<div class="et_pd_top">
     <span>企业 &gt; {yun:}$headertitle{/yun} &gt; {yun:}$row.name{/yun}</span>
</div>
<form name="myform" action="index.php?c=admin_comjob&a=edit&id={yun:}$row.id{/yun}" method="post" onSubmit="return savejob()">
<div class="peo_det wapadmin_com_list">
     {yun:}if $row.id{/yun}
     <div class="peo_det_yh">
          <div class="peo_det_yh_nm"><div class="nb">用户编号：</div></div>
          <div class="peo_det_yh_c"><div class="wapadmin_text_p">{yun:}$row.id{/yun}</div></div>
     </div>
     {yun:}/if{/yun}
     <div class="peo_det_yh">
          <div class="peo_det_yh_nm"><div class="nb">职位名称：</div></div>
          <div class="peo_det_yh_c"><div class="wapadmin_text_box"><input id="name" name="name" value="{yun:}$row.name{/yun}" class="wapadmin_text_box_text"/></div></div>
     </div>
      <div class="peo_det_yh">
          <div class="peo_det_yh_nm"><div class="nb">从事行业：</div></div>
          <div class="peo_det_yh_c">
          <div class="wapadmin_select_box">
          <select name="hy" id="hy" class="wapadmin_select">
          {yun:}foreach from=$industry_index key=j item=v{/yun}
            <option value='{yun:}$v{/yun}' {yun:}if $row.hy==$v{/yun}selected{yun:}/if{/yun}>{yun:}$industry_name[$v]{/yun}</option>
            {yun:}/foreach{/yun}
          </select></div>
          
          </div>
     </div>
      <div class="peo_det_yh">
          <div class="peo_det_yh_nm"><div class="nb">职位类别：</div></div>
          <div class="peo_det_yh_c ">
         <div class="wapadmin_select_box_w30"> <select name="job1" id="job1" onchange="checkjob(this.value,'1');" class="wapadmin_select">
              <option value="">--请选择--</option>
                {yun:}foreach from=$job_index key=j item=v{/yun}
              <option value='{yun:}$v{/yun}' {yun:}if $row.job1==$v{/yun}selected{yun:}/if{/yun}>{yun:}$job_name[$v]{/yun}</option>
                {yun:}/foreach{/yun}
            </select></div>
              <div class="wapadmin_select_box_w30">   <select name="job1_son" id="job1_son" onchange="checkjob(this.value,'2');" class="wapadmin_select">
              <option value="">--请选择--</option>
                {yun:}foreach from=$job_type[$row.job1] key=j item=va{/yun}
              <option value='{yun:}$va{/yun}' {yun:}if $row.job1_son==$va{/yun}selected{yun:}/if{/yun}>{yun:}$job_name[$va]{/yun}</option>
                {yun:}/foreach{/yun}
            </select>
            </div>
               <div class="wapadmin_select_box_w30">
                   <select name="job_post" id="job_post" class="wapadmin_select">
              <option value="">--请选择--</option>
                {yun:}foreach from=$job_type[$row.job1_son] key=j item=val{/yun}
              <option value='{yun:}$val{/yun}' {yun:}if $row.job_post==$val{/yun}selected{yun:}/if{/yun}>{yun:}$job_name[$val]{/yun}</option>
                {yun:}/foreach{/yun}
            </select>
               </div>
            
            </div>
      </div>
    
     <div class="peo_det_yh">
          <div class="peo_det_yh_nm"><div class="nb">工作地点：</div></div>
          <div class="peo_det_yh_c">
            <div class="wapadmin_select_box_w30"> <select name="provinceid" id="provinceid" onchange="checkcity(this.value,'1');" class="wapadmin_select">
              <option value="">请选择</option>
                {yun:}foreach from=$city_index key=j item=v{/yun}
              <option value='{yun:}$v{/yun}' {yun:}if $row.provinceid==$v{/yun}selected{yun:}/if{/yun}>{yun:}$city_name[$v]{/yun}</option>
                {yun:}/foreach{/yun}
            </select></div>
            
               <div class="wapadmin_select_box_w30">   <select name="cityid"  id="cityid" onchange="checkcity(this.value,'2');" class="wapadmin_select">
              <option value="">请选择</option> 
                {yun:}if $row.provinceid{/yun}
                    {yun:}foreach from=$city_type[$row.provinceid] key=j item=v{/yun}
              <option value='{yun:}$v{/yun}' {yun:}if $row.cityid==$v{/yun}selected{yun:}/if{/yun}>{yun:}$city_name[$v]{/yun}</option>
                    {yun:}/foreach{/yun}
                {yun:}/if{/yun}
            </select></div>
               <div class="wapadmin_select_box_w30"> <select name="three_cityid" size="1" id="three_cityid" class="wapadmin_select">
            <option value="">请选择</option>
            {yun:}if $row.cityid{/yun}
            {yun:}foreach from=$city_type[$row.cityid] key=j item=v{/yun}
            <option value='{yun:}$v{/yun}' {yun:}if $row.three_cityid==$v{/yun}selected{yun:}/if{/yun}>{yun:}$city_name[$v]{/yun}</option>
            {yun:}/foreach{/yun}
            {yun:}/if{/yun}
            </select></div>
            </div>
      </div>
    
     <div class="peo_det_yh">
          <div class="peo_det_yh_nm"><div class="nb">工资待遇：</div></div>
          <div class="peo_det_yh_c">
            <div>
          	<input type="text" name="minsalary" id="minsalary" class="admin_text_w70" size="6" value="{yun:}$row.minsalary{/yun}" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" placeholder="最低薪资"{yun:}if !$row.minsalary&&!$row.maxsalary&&$row.id{/yun} disabled="disabled"{yun:}/if{/yun}/>-
            <input type="text" name="maxsalary" id="maxsalary" class="admin_text_w70" size="6" value="{yun:}if $row.maxsalary{/yun}{yun:}$row.maxsalary{/yun}{yun:}/if{/yun}" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')"placeholder="最高薪资"{yun:}if !$row.minsalary&&!$row.maxsalary&&$row.id{/yun} disabled="disabled"{yun:}/if{/yun}/>
            <label style="color:#999;"><input type="checkbox" id="salary_type" name="salary_type" value="1" onclick="change_salary_type()"{yun:}if !$row.minsalary&&!$row.maxsalary&&$row.id{/yun} checked="checked"{yun:}/if{/yun} />面议</label>
            </div>
          </div>
     </div>
      <div class="peo_det_yh">
          <div class="peo_det_yh_nm"><div class="nb">招聘人数：</div></div>
          <div class="peo_det_yh_c">  <div class="wapadmin_select_box"><select name="number" id="number" class="wapadmin_select">
            {yun:}foreach from=$comdata.job_number key=j item=v{/yun}
            <option value='{yun:}$v{/yun}' {yun:}if $row.number==$v{/yun}selected{yun:}/if{/yun}>{yun:}$comclass_name[$v]{/yun}</option>
            {yun:}/foreach{/yun}
          </select></div></div>
     </div>
      <div class="peo_det_yh">
          <div class="peo_det_yh_nm"><div class="nb">工作经验：</div></div>
          <div class="peo_det_yh_c">  <div class="wapadmin_select_box"><select name="exp" id="exp" class="wapadmin_select">
        {yun:}foreach from=$comdata.job_exp key=j item=v{/yun}
            <option value='{yun:}$v{/yun}' {yun:}if $row.exp==$v{/yun}selected{yun:}/if{/yun}>{yun:}$comclass_name[$v]{/yun}</option>
		{yun:}/foreach{/yun}
          </select></div></div>
     </div>
      <div class="peo_det_yh">
          <div class="peo_det_yh_nm"><div class="nb">到岗时间：</div></div>
          <div class="peo_det_yh_c">  <div class="wapadmin_select_box"><select name="report" id="report" class="wapadmin_select">
        {yun:}foreach from=$comdata.job_report key=j item=v{/yun}
            <option value='{yun:}$v{/yun}' {yun:}if $row.report==$v{/yun}selected{yun:}/if{/yun}>{yun:}$comclass_name[$v]{/yun}</option>
		{yun:}/foreach{/yun}
          </select></div></div>
     </div>
      <div class="peo_det_yh">
          <div class="peo_det_yh_nm"><div class="nb">性　　别：</div></div>
          <div class="peo_det_yh_c">  <div class="wapadmin_select_box">
          
          <select name="sex" id="sex" class="wapadmin_select">
         {yun:}foreach from=$arr_data.sex key=j item=v{/yun}    
            <option value='{yun:}$j{/yun}' {yun:}if $row.sex==$j{/yun}selected{yun:}/if{/yun}>{yun:}$v{/yun}</option>
          {yun:}/foreach{/yun}        
            
		
          </select>
          
          
          
          </div></div>
     </div>
      <div class="peo_det_yh">
          <div class="peo_det_yh_nm"><div class="nb">教育程度：</div></div>
          <div class="peo_det_yh_c">  <div class="wapadmin_select_box"><select name="edu" id="edu" class="wapadmin_select">
        {yun:}foreach from=$comdata.job_edu key=j item=v{/yun}
            <option value='{yun:}$v{/yun}' {yun:}if $row.edu==$v{/yun}selected{yun:}/if{/yun}>{yun:}$comclass_name[$v]{/yun}</option>
		{yun:}/foreach{/yun}
          </select></div></div>
     </div>
      <div class="peo_det_yh">
          <div class="peo_det_yh_nm"><div class="nb">婚姻状况：</div></div>
          <div class="peo_det_yh_c">  <div class="wapadmin_select_box"><select name="marriage" id="marriage" class="wapadmin_select">
        {yun:}foreach from=$comdata.job_marriage key=j item=v{/yun}
            <option value='{yun:}$v{/yun}' {yun:}if $row.marriage==$v{/yun}selected{yun:}/if{/yun}>{yun:}$comclass_name[$v]{/yun}</option>
        {yun:}/foreach{/yun}
          </select></div></div>
     </div>
      <div class="peo_det_yh">
          <div class="peo_det_yh_nm"><div class="nb">语言要求：</div></div>
          <div class="peo_det_yh_c">
          {yun:}foreach from=$comdata.job_lang key=j item=v{/yun}
			
			 <span class="peo_det_yh_list_fl"> <input type="checkbox"  id="lang{yun:}$v{/yun}" value='{yun:}$v{/yun}' name="lang[]" {yun:}if $row.lang && in_array($v,$row.lang){/yun}checked{yun:}/if{/yun} class="" />
			  <label for="lang{yun:}$v{/yun}" >{yun:}$comclass_name[$v]{/yun}</label>
              </span>
			{yun:}/foreach{/yun}</div>
     </div>
     <!--  <div class="peo_det_yh">
          <div class="peo_det_yh_nm"><div class="nb">福利待遇：</div></div>
          <div class="peo_det_yh_c">
          {yun:}foreach from=$comdata.job_welfare key=j item=v{/yun}
		 <span class="peo_det_yh_list_fl">
		  <input type="checkbox" value='{yun:}$v{/yun}' id="welfare{yun:}$v{/yun}" name="welfare[]" {yun:}if $row.welfare && in_array($v,$row.welfare){/yun}checked{yun:}/if{/yun} class="job_add_check_box">
		  <label for="welfare{yun:}$v{/yun}" >{yun:}$comclass_name[$v]{/yun}</label>
  </span>
		{yun:}/foreach{/yun}</div>
     </div>--> 
      <div class="peo_det_yh">
          <div class="peo_det_yh_nm"><div class="nb">描述职位：</div></div>
          <div class="peo_det_yh_c"><textarea  name="description" id="description"  class="wapadmin_textarea_box_t">{yun:}$row.description{/yun}</textarea></div>
     </div>
</div>
<div class="peo_det_bt">
<div style="text-align:center;">
<input type="hidden" name="lasturl" value="{yun:}$lasturl{/yun}">
<input type="hidden" name="id" value="{yun:}$row.id{/yun}">
<input class="admin_submit4" type="submit" name="update" value="&nbsp;修 改&nbsp;" />
<input class="admin_save_sub" type="button" value="返 回" name="" onClick="history.back()" />
</div>
</div>
</form>
<input type="hidden" id="circleurl" value='{yun:}url m=ajax c=ajaxcircle{/yun}' />
<script type="text/javascript">
var wapurl='{yun:}url m=wap{/yun}';
function toDate(str){
	var sd=str.split("-");
	return new Date(sd[0],sd[1],sd[2]);
}
function savejob(id){
 	var name = $.trim($("#name").val());
	if(name==''){
		layermsg('职位名称不能为空！',2);return false;
	}
	if($("#job1_son").val()==''){
		layermsg('请选择职位类别！',2);return false;
	}

	if($("#provinceid").val()==''){
		layermsg('请选择工作地点！',2);return false;
	}
	var minsalary=$.trim($("#minsalary").val());
	var maxsalary=$.trim($("#maxsalary").val());
	if($("#salary_type").attr("checked")!='checked'){
	if(minsalary==''||minsalary=='0'){
		layermsg('请填写工资！', 2);return false;
	}
	if(maxsalary){
		if(parseInt(maxsalary)<=parseInt(minsalary)){
			layermsg('最高工资必须大于最低工资！', 2);return false;
		}
	}
	}
	var description = ue.getContent(); 
	if(description==""){
		layermsg('职位描述不能为空！',2);return false;
	}else{
		$("#description").val(description);
	}
	 
}
function checkjob(id,type){
	if(id>0){
		$.post(wapurl+"?c=ajax&a=wap_job",{id:id,type:type},function(data){
			if(type==1){
				$("#job1_son").html(data);
			}else{
				$("#job_post").html(data);
			}
		})
	}else{
		if(type==1){
			$("#job1_son").html('<option value="">请选择</option>');
		}
	}
	$("#job_post").html('<option value="">请选择</option>');
}
function checkcity(id,type){
	if(id>0){
		$.post(wapurl+"?c=ajax&a=wap_city",{id:id,type:type},function(data){
			if(type==1){
				$("#cityid").html(data);
			}else{
				$("#three_cityid").html(data);
			}
		})
	}else{
		if(type==1){
			$("#cityid").html('<option value="">请选择</option>');
		}else{
			$("#three_cityid").html('<option value="">请选择</option>');
		}
	}
	
}
function change_salary_type(){
	if($("#salary_type").attr('checked')=='checked'){
		$("#minsalary").attr("disabled","disabled");
		$("#maxsalary").attr("disabled","disabled");
		$("#minsalary").val(0);$("#maxsalary").val(0);
	}else{
		$("#minsalary").removeAttr("disabled","disabled");
		$("#maxsalary").removeAttr("disabled","disabled");
		$("#minsalary").val('{yun:}$row.minsalary{/yun}');
		$("#maxsalary").val('{yun:}$row.maxsalary{/yun}');
	}
}
</script>
{yun:}if $layer{/yun}
<input id="layermsg" value="{yun:}$layer.msg{/yun}" type="hidden">
<input id="layerurl" value="{yun:}$layer.url{/yun}" type="hidden">
<script>$(document).ready(function(){islayer();});</script>
{yun:}/if{/yun}
</body>
</html>
